package cn.minhx.infrastructure.persistent.dao;

import cn.minhx.infrastructure.persistent.po.StrategyAward;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 抽奖策略奖品明细 Dao
 * @author min
 */
@Mapper
public interface IStrategyAwardDao {

    List<StrategyAward> queryStrategyAwardList();

    /**
     * 通过策略ID查询策略奖品
     * @param strategyId 策略ID
     * @return 奖品列表
     */
    List<StrategyAward> queryStrategyAwardListByStrategyId(Long strategyId);

    String queryStrategyAwardRuleModels(StrategyAward strategyAward);

    /**
     * 库存 -1
     * @param strategyAward 策略奖品
     */
    void updateStrategyAwardStock(StrategyAward strategyAward);

    StrategyAward queryStrategyAward(StrategyAward strategyAwardReq);

}
